/**
 * 
 */
package com.store;

import java.util.ArrayList;
import java.util.List;

import com.jedi.BaseObj;
import com.tss.util.DbConn;
import com.tss.util.DbRs;

/**
 * @author wevjoso
 *
 */
public class PalmonthMgr extends BaseObj{
	public Palmonth get(String y ,String m) {
		clearErr();
		Palmonth palmonth = new Palmonth();
		DbConn conn = new DbConn();
		try {
			String sql = "";
			sql = "select * from palmonth where y=? and m=?";
			conn.prepare(sql);
			conn.setString(1,y);
			conn.setString(2,m);
			DbRs rs = conn.executeQuery();
			if (rs == null || rs.size() ==0) return null;
			palmonth.setCfee(getDouble(rs,0,"cfee"));
			palmonth.setCreateman(get(rs,0,"createman"));
			palmonth.setCreatetime(getDate(rs,0,"createtime"));
			palmonth.setHfee(getDouble(rs,0,"hfee"));
			palmonth.setM(getInt(rs,0,"m"));
			palmonth.setPfee(getDouble(rs,0,"pfee"));
			palmonth.setTfee(getDouble(rs,0,"tfee"));
			palmonth.setWfee(getDouble(rs,0,"wfee"));
			palmonth.setY(getInt(rs,0,"y"));
		
		
			
			return palmonth;
		}
		catch(Exception ex) {
			ex.printStackTrace();
			setErr(ex.getMessage());
			return null;
		}
		finally {
			conn.close();
		}
	}
}
